package tech.aistar.service;

import com.github.pagehelper.PageInfo;
import org.apache.ibatis.annotations.Param;
import tech.aistar.entity.House;

import java.util.Date;
import java.util.List;

public interface IHouseService {

    List<House> selectAll();
    List<House> selectcount();


    void insert(House house);

    Integer selectDoorPlate(String doorplate,String residentialQuarters);

    Integer selectHouseId(Integer agentId, Integer landlordId, String houseEvaluate, String landlordRequire,
                          String propertyOwnershipCertificate, String houseType, String area, Integer floor,
                          String parkPlace, String tenancy, String orientate, String region,
                          String rentType, String houseState, Double rentMoney);
    void  updateByPrimaryKey(House house);

    void deleteByPrimaryKey(Integer id);

    //分页
    PageInfo<House> findByPage(String type, String lab, Integer pageNow, Integer pageSize);

    PageInfo<House> findByAllPage(String type, String lab, Integer min, Integer max, Integer pageNow, Integer pageSize);

    PageInfo<House> finalPage(String lab, String min, String max, String type, String chao, Integer pageNow, Integer pageSize);

    List<House> findById(Integer integer);

    List<House> findByHouseType(String str);

    House selectById(Integer integer);

    //学生版
    List<House> studentAll();

    //地区
    List<House> regionAll(String lab);

    List<House> searchAll(String str, String lab);

    //搜索框 下拉列表 复选框
    List<House> searchStudentAll(String str, String lab, Integer min, Integer max);

    //最终所有条件
    List<House> finalSearch(String lab, String min, String max, String type, String chao);





    //白领
    List<House>  whiteFindByHouseType(String str);

    List<House> FindById(Integer integer, String rent_type);
    PageInfo<House>  FindByIdPage(Integer integer, String rent_type, Integer pageNow, Integer pageSize);

    House whiteSelectById(Integer integer);

    List<House> whiteAll();

    List<House> whiteSearchAll(@Param("str") String str, @Param("lab") String lab);

    PageInfo<House> whiteTypePage(String type, String lab, Integer pageNow, Integer pageSize);

    List<House> finalWhiteSearch(String lab, String min, String max, String type, String chao);

    PageInfo<House> finalWhitePage(String lab, String min, String max, String type, String chao, Integer pageNow, Integer pageSize);


    //合租
    List<House> finalHeSearch(String lab, String min, String max, String type, String chao);
    //合租分页
    PageInfo<House> finalHePage(String lab, String min, String max, String type, String chao, Integer pageNow, Integer pageSize);

    //合租 + 身份
    List<House> findIdentity(String lab, String identity, String min, String max,  String type,String chao);
    //合租 + 身份分页
    PageInfo<House> finalIdentityPage(String lab, String identity, String min, String max, String type, String chao, Integer pageNow, Integer pageSize);



    //整租
    List<House> finalZhengSearch(String lab, String min, String max, String type, String chao);
    //整租分页
    PageInfo<House> finalZhengPage(String lab, String min, String max, String type, String chao, Integer pageNow, Integer pageSize);


    //合租 + 身份
    List<House> findZhengIdentity(String lab, String identity, String min, String max,  String type,String chao);
    //合租 + 身份分页
    PageInfo<House> finalZhengIdentityPage(String lab, String identity, String min, String max, String type, String chao, Integer pageNow, Integer pageSize);



    //环境 - 类型 - 白领
    List<House> houseFacility(
            String green, String traffic, String shop, String school, String fridge,
            String tv, String wash, String geyser, String air, String broad,
            String sofa, String bed, String heat, String wardrobe, String cook,
            String bath, String balcony, String lock, String hood, String stove);

    PageInfo<House> houseFacilityPage(String green, String traffic, String shop, String school, String fridge,
                                      String tv, String wash, String geyser, String air, String broad,
                                      String sofa, String bed, String heat, String wardrobe, String cook,
                                      String bath, String balcony, String lock, String hood, String stove,
                                      Integer pageNow, Integer pageSize);


    //环境 - 类型 - 学生
    List<House> houseStudentFacility(
            String green, String traffic, String shop, String school, String fridge,
            String tv, String wash, String geyser, String air, String broad,
            String sofa, String bed, String heat, String wardrobe, String cook,
            String bath, String balcony, String lock, String hood, String stove);

    PageInfo<House> houseStudentFacilityPage(String green, String traffic, String shop, String school, String fridge,
                                             String tv, String wash, String geyser, String air, String broad,
                                             String sofa, String bed, String heat, String wardrobe, String cook,
                                             String bath, String balcony, String lock, String hood, String stove,
                                             Integer pageNow, Integer pageSize);

    //环境 - 类型 - 合租
    List<House> houseHeFacility(
            String green, String traffic, String shop, String school, String fridge,
            String tv, String wash, String geyser, String air, String broad,
            String sofa, String bed, String heat, String wardrobe, String cook,
            String bath, String balcony, String lock, String hood, String stove);

    PageInfo<House> houseHeFacilityPage(String green, String traffic, String shop, String school, String fridge,
                                        String tv, String wash, String geyser, String air, String broad,
                                        String sofa, String bed, String heat, String wardrobe, String cook,
                                        String bath, String balcony, String lock, String hood, String stove,
                                        Integer pageNow, Integer pageSize);





    //设施环境 - 全 - 合租
    List<House> houseAllHeFacility(
               String lab, String identity, String min, String max,  String type,String chao,
               String green, String traffic, String shop, String school, String fridge,
               String tv, String wash, String geyser, String air, String broad,
               String sofa, String bed, String heat, String wardrobe, String cook,
               String bath, String balcony, String lock, String hood, String stove);


    List<House> selectHe();

    //设施环境 - 全 - 合租分页
    PageInfo<House> houseAllHeFacilityPage(
            String lab, String identity, String min, String max,  String type,String chao,
            String green, String traffic, String shop, String school, String fridge,
            String tv, String wash, String geyser, String air, String broad,
            String sofa, String bed, String heat, String wardrobe, String cook,
            String bath, String balcony, String lock, String hood, String stove,
            Integer pageNow, Integer pageSize);

    List<House> selectZheng();


    //设施环境 - 全 - 合租
    List<House> houseAllZhengFacility(
            String lab, String identity, String min, String max,  String type,String chao,
            String green, String traffic, String shop, String school, String fridge,
            String tv, String wash, String geyser, String air, String broad,
            String sofa, String bed, String heat, String wardrobe, String cook,
            String bath, String balcony, String lock, String hood, String stove);

    //设施环境 - 全 - 合租分页
    PageInfo<House> houseAllZhengFacilityPage(
            String lab, String identity, String min, String max,  String type,String chao,
            String green, String traffic, String shop, String school, String fridge,
            String tv, String wash, String geyser, String air, String broad,
            String sofa, String bed, String heat, String wardrobe, String cook,
            String bath, String balcony, String lock, String hood, String stove,
            Integer pageNow, Integer pageSize);





    //环境 - 类型 - 整租
    List<House> houseZhengFacility(
            String green, String traffic, String shop, String school, String fridge,
            String tv, String wash, String geyser, String air, String broad,
            String sofa, String bed, String heat, String wardrobe, String cook,
            String bath, String balcony, String lock, String hood, String stove);

    PageInfo<House> houseZhengFacilityPage(String green, String traffic, String shop, String school, String fridge,
                                           String tv, String wash, String geyser, String air, String broad,
                                           String sofa, String bed, String heat, String wardrobe, String cook,
                                           String bath, String balcony, String lock, String hood, String stove,
                                           Integer pageNow, Integer pageSize);

    int insertHouse(House house);

    int insertHouse2(House house);

    House selectByhouseId(Integer houseId);

    List<House> selectBylandlordId(Integer landlordId);

    int deleteById(Integer id);


    Integer selectagentByhouseId(Integer integer);

    List<House> selectByagentId(Integer agentId);


    List<House> selectByagentIds(Integer agentId);

    List<House> selectHouseLimit();

    int updateStateById(Integer id);
    String selectRentTypeById(Integer id);
}
